<style>
    .table-adminlog tr td {
        word-break: break-all;
    }
</style>
<table class="table table-striped table-chapterdetail">
    <thead>
    <tr>
        <th style="text-align: center;">{$resourceName}</th>
    </tr>
    </thead>
    <tbody>
        {if isset($resource.parts)}
        {volist name="resource.parts" id="vo" }
        <tr>
            <td width="90%">{$vo.module_type_name}</td>
            <td></td>
        </tr>
        
        {volist name="vo.children" id="vo2" }
            <tr>
                <td width="80%">{php}echo str_replace('../packages',$resmain,$vo2['stem']);{/php}</td>
                <td>{$vo2.question_ref_sorce}分</td>
            </tr>
        {/volist}
        {/volist}
        {else}
        {volist name="resource" id="vo" }
        <tr>
            <td width="90%">{$vo.name}</td>
            <td><a href="#" onclick="stopall();playAudio('{$resmain}{$vo.audioUrl}');return false;"><i class="fa fa-volume-up"></i></a></td>
        </tr>
        {/volist}
        {/if}
    </tbody>
</table>
<div class="hide layer-footer">
    <label class="control-label col-xs-12 col-sm-2"></label>
    <div class="col-xs-12 col-sm-8">
        <button type="reset" class="btn btn-primary btn-embossed btn-close" onclick="Layer.closeAll();">{:__('Close')}</button>
    </div>
</div>
<script type="text/javascript">
    function playAudio(value){
        var audio = new Audio(value);
        audio.play();
    }
    function stopall(){
        var audio = new Audio(".audiosd");
        audio.pause();
    }
</script>
